# @author anthony
# @date  2022/4/2
require 'rails'

module OpenPinduoduo
  class Railtie < Rails::Railtie

    generators do
      require 'generators/open_pinduoduo/install_generator'
    end

    initialize 'load pinduoduo.yml' do
      config_file = Rails.root + 'config/pinduoduo.yml'
      OpenPinduoduo.load(config_file) if config_file.file?
    end

  end
end